from time import sleep


def get_id_list(orin, type):
    sleep(0.1)
    """获取进程id列表"""
    stdin, stdout, stderr = orin.exec_command("ps aux|grep %s |head -2 |awk '{print $2}'" % type)

    return stdout.read().decode("utf-8").strip().split("\n")
